package cn.qiao.demo.decorator;

/**
 * desc:
 * 摩卡
 * @author qiao
 * @date 2023年05月14日 11:59
 */
public class Mocha extends CondimentDecorator{

    private Beverage beverage;
    private double price = 20;

    public Mocha(Beverage beverage) {
        this.beverage = beverage;
    }

    public String getDescription() {
        return beverage.getDescription() + "Mocha";
    }

    public double cost() {
        return beverage.cost() + price;
    }
}
